package com.uni.service;

import com.uni.pojo.Perm;
import com.uni.pojo.Role;
import com.uni.pojo.User;

import java.util.List;
import java.util.Map;

/**
 * Author:      Unirithe/Mr.Chao
 * CSDN:        https://blog.csdn.net/Unirithe
 * CreatedTime:  2022/2/5 9:04
 **/
public interface RoleService {
    Role queryById(Integer id);
    User setRole(User user, Integer roleId);
    Role queryRoleByUserCode(User user);
    List<Role> queryAllRole();
    Role updateRoleByCode(User user, Role role);

    List<Role> queryAllROleWithPerm();

    int addPerm(Integer roleId, Integer permId);

    int removePermByRole(Integer roleId, Integer permId);

    List<Perm> queryAllPerms();

    List<Perm> queryPermsBySome(Map<String, String> map);
}
